package com.hilaver.dzmis.dao;

import java.util.List;

import org.hibernate.Query;

import com.hilaver.dzmis.basicinfo.BiMeasureSpecification;

public class BiMeasureSpecificationDAO extends BaseHibernateDAO {
	
	public List getMaxPatronageIndex(String ctStature, String ctCollarType) throws Exception{
		String hql = "select max(patronageIndex) from " + BiMeasureSpecification.class.getName() + " where ctStature = ? and ctCollarType = ?";
		try {
			Query queryObject = getSession().createQuery(hql);
			queryObject.setParameter(0, ctStature);
			queryObject.setParameter(1, ctCollarType);
			return queryObject.list();
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}
}
